Make async print preview work by actually starting the print process in
authorAlexander Larsson <alexl@redhat.com>
Mon, 16 Apr 2007 08:57:35 +0000 (08:57 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Mon, 16 Apr 2007 08:57:35 +0000 (08:57 +0000)
2007-04-16  Alexander Larsson  <alexl@redhat.com>

* gtk/gtkprintoperation.c (gtk_print_operation_run):
Make async print preview work by actually starting
the print process in that case (#424168)

svn path=/trunk/; revision=17603

ChangeLog
gtk/gtkprintoperation.c

index 667fe1630bf4cf9777767b9efc1fdb25342150fb..a7385ee1550ca0a1dfdb0b243949bf32318a6c95 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-04-16  Alexander Larsson  <alexl@redhat.com>
+
+       * gtk/gtkprintoperation.c (gtk_print_operation_run):
+       Make async print preview work by actually starting
+       the print process in that case (#424168)
+
 2007-04-14  Yevgen Muntyan <muntyan@tamu.edu>
 
        * gtk/gtkselection.c (selection_get_text_plain): fixed
index a06f112cd75bca7179ef20322b6078d63a45ca5f..2440a1dd716e05570cd97aaf5c5c06512b17c7a7 100644 (file)
@@ -2368,12 +2368,14 @@ gtk_print_operation_run (GtkPrintOperation        *op,
   GtkPrintOperationResult result;
   GtkPageSetup *page_setup;
   gboolean do_print;
+  gboolean run_print_pages;
   
   g_return_val_if_fail (GTK_IS_PRINT_OPERATION (op), 
                         GTK_PRINT_OPERATION_RESULT_ERROR);
 
   priv = op->priv;
 
+  run_print_pages = TRUE;
   do_print = FALSE;
   priv->error = NULL;
   priv->action = action;
@@ -2409,6 +2411,7 @@ gtk_print_operation_run (GtkPrintOperation        *op,
                                                              parent,
                                                              print_pages);
       result = GTK_PRINT_OPERATION_RESULT_IN_PROGRESS;
+      run_print_pages = FALSE; /* print_pages is called asynchronously from dialog */
     }
 #endif
   else
@@ -2420,7 +2423,7 @@ gtk_print_operation_run (GtkPrintOperation        *op,
                                                                 &do_print);
     }
 
-  if (result != GTK_PRINT_OPERATION_RESULT_IN_PROGRESS)
+  if (run_print_pages)
     print_pages (op, parent, do_print, result);
 
   if (priv->error && error)